package servlet;

import java.io.IOException;
import java.io.PrintWriter;
import java.sql.ResultSet;
import java.util.List;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import vo.Information;
import dao.InformationDAO;

import JavaBeans.DbUtil;

public class UpdateSelectOne extends HttpServlet {

	public UpdateSelectOne() {
		super();
	}

	public void destroy() {
		super.destroy();
	}

	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		request.setCharacterEncoding("UTF-8");

		int info_id = Integer.valueOf(request.getParameter("info_id"));
		


		InformationDAO ido = new InformationDAO();
		List<Information> list = ido.updateSearch(info_id) ;


		RequestDispatcher rd;
		request.setAttribute("update_one_rs", list);
		rd = request.getRequestDispatcher("/admin/update/info_update_submit.jsp");
		rd.forward(request, response);

	}

	public void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {

	}

	public void init() throws ServletException {

	}

}
